<template>
  <demoBlock title="自定义按钮">
    <vcu-search
      v-model="value"
      label="产品"
      placeholder="请输入搜索关键词"
      show-action
      @search="onSearch"
    >
      <template #action>
        <vcu-button type="primary" size="small"  round @click="onSearch">
          搜索
        </vcu-button>
      </template>
    </vcu-search>
  </demoBlock>
</template>

<script>
import { defineComponent, ref } from "vue";

export default defineComponent({
  setup() {
    const value = ref("");
    const onSearch = (val) => console.info(val);
    return { value, onSearch };
  },
});
</script>
